import React, {Component} from 'react';

class SetState extends Component {
    state = {
        num:0
    }
    componentDidMount() {
        this.setState({num:1})

        console.log(this.state.num)
    }

    render() {
        return (
            <div>

            </div>
        );
    }
}

export default SetState;